package org.dromara.openApi.store.controller;

import cn.hutool.core.lang.tree.Tree;
import jakarta.annotation.Resource;
import org.dromara.common.core.domain.R;
import org.dromara.common.web.core.BaseController;
import org.dromara.openApi.store.service.IOpenApiStoreService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 东云区域门店
 *
 * @author wdm
 * @date 2024-02-28
 */
@Validated
@RestController
@RequestMapping(value = "/openApi/store",name = "门店")
public class OpenApiStoreController extends BaseController {

    @Resource
    private IOpenApiStoreService openApiStoreService;


    /**
     * 查询东云区域门店列表
     */
    @PostMapping(value = "/treeList",name = "门店树形列表")
    public R<List<Tree<Long>>> list() {
        List<Tree<Long>> list = openApiStoreService.queryList();
        return R.ok(list);
    }

}
